/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package model;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;

/**
 *
 * @author Ekaterina
 */

@Entity
@Table (name = "kartka", catalog = "otdelkadrov", schema = "")
public class Kartka implements Serializable {
       @Column(name = "datek")
            @Temporal(javax.persistence.TemporalType.TIMESTAMP)
private Date datek;
       
           @Column(name = "number")
private int number;
           
               @Column(name = "work_type")
private String work_type;
               
          @Column(name = "kod_edr")
private String kod_edr;
                   
         @Column(name = "pidpriemstvo")
private String pidpriemstvo;
         
         @Id
@GeneratedValue
@Column (name="id")
private Integer id = null;

@OneToOne
@JoinColumn(name = "worker",referencedColumnName = "id")
private Worker worker;

    public Date getDatek() {
        return datek;
    }

    public int getNumber() {
        return number;
    }

    public String getWork_type() {
        return work_type;
    }

    public String getKod() {
        return kod_edr;
    }

    public String getPidpriemstvo() {
        return pidpriemstvo;
    }

    public Integer getId() {
        return id;
    }

    public Worker getWorker() {
        return worker;
    }

    public void setDatek(Date datek) {
        this.datek = datek;
    }

    public void setNumber(int number) {
        this.number = number;
    }

    public void setWork_type(String work_type) {
        this.work_type = work_type;
    }

    public void setKod(String kod_edr) {
        this.kod_edr = kod_edr;
    }

    public void setPidpriemstvo(String pidpriemstvo) {
        this.pidpriemstvo = pidpriemstvo;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public void setWorker(Worker worker) {
        this.worker = worker;
    }


}
